package com.neusoft.sysdata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.neusoft.sysdata.entity.SysSynData;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description: SYS_SYN_DATA
 * @Author: jeecg-boot
 * @Date: 2019-12-10
 * @Version: V1.0
 */
public interface SysSynDataMapper extends BaseMapper<SysSynData> {
    @Select("SELECT * FROM SYS_SYN_DATA WHERE STATUS=1 AND SYS_TYPE = #{type,jdbcType=VARCHAR}")
    public List<SysSynData> selectSynDataInfo(String type);

    @Select("SELECT * FROM SYS_SYN_DATA WHERE STATUS=1 AND ROW_CODE = #{code,jdbcType=VARCHAR} AND ROWNUM=1 ")
    public SysSynData selectSynDataOneInfo(String code);

    @Select("SELECT * FROM SYS_SYN_DATA WHERE STATUS=1 AND ROW_CODE = #{code,jdbcType=VARCHAR} AND SYS_TYPE = #{type,jdbcType=VARCHAR} AND ROWNUM=1 ")
    public SysSynData selectSynCodeOneInfo(String code, String type);

    @Select("SELECT * FROM SYS_SYN_DATA WHERE STATUS=1 AND CODE_ID = #{rowid,jdbcType=VARCHAR} AND SYS_TYPE = #{type,jdbcType=VARCHAR} AND ROWNUM=1 ")
    public SysSynData selectSynRowOneInfo(String rowid, String type);
}
